#include "log_file_output.h"
using namespace std;

bool LogFileOutput::Open(const std::string &filename)
{
    ofs_.open(filename, ios::out | ios::binary | ios::app);

    if (ofs_.is_open())
        return true;

    return false;
}

LogFileOutput::~LogFileOutput()
{
    if (ofs_.is_open())
    {
        ofs_.close();
    }
}

void LogFileOutput::Output(const std::string &log)
{
    ofs_ << log << "\n";
}